<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<title>机构管理</title>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<!-- 当前页面样式 -->
<link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
<!-- 当前页面样式 END -->
<style type="text/css">
.blue{
	color: blue
}
</style>
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<s:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>	
<script type="text/javascript" src="<s:url value="/js/query_Address.js" />"></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/AddressQuery.js"/>'></script>
<script type="text/javascript">
$(document).ready(function(){    
		$('#sub').click(function(){
			$("#queryForm").attr("action","<%=basePath%>/org/search.ct");
			$("#queryForm").submit();
			$(this).attr("disabled","true");
		});
		 $('#alertIns').click(function(){
			var dd = $("input[name=multi_sel]:checked");
				if(dd.length!=1){
					alert("请选择一条记录进行操作！");
					return false;
				}
			var accountNoStr='';
			dd.each(function(){
					accountNoStr = $(this).val();
			});
			$("#insCd").val(accountNoStr);
			$("#queryForm").attr("action","<%=basePath%>/org/updateOrgJsp.ct");
			$("#queryForm").submit();
		}); 
		$('#addIns').click(function(){
			$("#queryForm").attr("action","<%=basePath%>/org/addRuleview.ct");
			$("#queryForm").submit();
		});
	});	
</script>
</head>

<body>
		<s:form id="queryForm" action="/org/search.ct" method="post"
			theme="simple">
			<s:hidden id="insCd" name="insCd"/>
			<table class="tb">
				<tbody>
				<tr class="tb-line">
            		<td class="tb-td" colspan="6"><div class="tb-h2">POS收单运营管理平台</div></td>
        		</tr>
				 <tr class="tb-line">
					<td class="tb-td" colspan="6">
						<div class="tb-h3">收单机构管理</div>
					</td>
				</tr>

				 <tr class="tb-line">
				 	<td width="12%" style="min-width: 150px" align="right" class="tb-td">
				 	 <div class="tb-h4" id="insName1">机构名称：</div>
				 	 </td>
					<td class="tb-td">
                		<label class="tb-input-normal">
                		<s:textfield id="insName"  name="orgSearchCondition.insName"  cssClass="queryWidth"/>
						</label>
					</td>
				</tr>
				
				<tr class="tb-line">
           		   <td class="tb-td line-submit" align="right" colspan="2">
                       <label class="tb-input-submit"><input type="button" value="查询" id="sub"/></label>
				       <label class="tb-input-submit"><input type="button" value="修改" id="alertIns"/></label>
				       <label class="tb-input-submit"><input type="button" value="添加" id="addIns"/></label>
				   </td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging" colspan="2"><page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/org/search.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
			
				
	<div class="big-tb">
    <table class="tb" style="width: 100%;">
				<thead>
            	<tr class="tb-line">
                <th class="tb-th" colspan="22"><div class="tb-h3">机构信息列表</div></th>
            	</tr>
					 <tr class="tb-line bg-gray">
					    <th class="tb-th">选择</th>
						<th class="tb-th" id="title">机构代码</th>	
						<th class="tb-th">机构类型</th>
						<th class="tb-th">机构名称</th>				
						<th class="tb-th">机构所在省</th>
						<th class="tb-th">机构所在市</th>
						<!-- <th class="tb-th">机构所在地</th> -->
						<th class="tb-th">机构状态</th>
						<th class="tb-th">机构清算方式</th>
						<th class="tb-th">机构分润清算周期</th>
						<th class="tb-th">机构分润清算模式</th>
						<th class="tb-th">收入账户户名</th>
						<th class="tb-th">收入账号</th>
						<th class="tb-th">收入账户开户行行号</th>
						<th class="tb-th">收入账户开户行行名</th>
						<th class="tb-th">支出账户户名</th>
						<th class="tb-th">支出账号</th>
						<th class="tb-th">支出账户开户行行号</th>
						<th class="tb-th">支出账户开户行行名</th>
						<th class="tb-th">操作员</th>
						<th class="tb-th">生成时间</th>
						<th class="tb-th">更新时间</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="bean">
					<tr class="tb-line" >
					    <td align="center" class="tb-td">
						   <s:checkboxlist name="multi_sel" list="#{#bean.InsIdCd}"   theme="simple" />
			            </td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsIdCd"/>
						</td>
						<td class="tb-td" align="center">
						<s:if test='#bean.InsType==\"1\" '>
						 收单机构
						</s:if>
						<s:elseif test='#bean.InsType==\"0\" '>
						分公司
						</s:elseif>		
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsName"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsProvCd"/>						
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsCityCd"/>
						</td>
						<%-- <td class="tb-td" align="center">
						<s:property value="#bean.InsRegionCd"/>
						</td> --%>
						<td class="tb-td" align="center">
						<s:if test='#bean.InsSta==\"1\"'>
						正常
						</s:if>
						<s:elseif test='#bean.InsSta==\"0\"'>
						注销 
						</s:elseif>	
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean."/>
						<s:if test='#bean.InsStlmTp==\"1\"'>
						非自主
						</s:if>
						<s:elseif test='#bean.InsStlmTp==\"0\"'>
						自主
						</s:elseif>	
						</td>
						<td class="tb-td" align="center">
						<s:if test='#bean.InsAloStlmCycle==\"0\"'>
						日结
						</s:if>
						<s:elseif test='#bean.InsAloStlmCycle==\"1\"'>
						周结
						</s:elseif>	
						<s:elseif test='#bean.InsAloStlmCycle==\"2\"'>
						月结
						</s:elseif>	
						<s:elseif test='#bean.InsAloStlmCycle==\"3\"'>
						季结
						</s:elseif>	
						<s:elseif test='#bean.InsAloStlmCycle==\"4\"'>
						半年结
						</s:elseif>	
						<s:elseif test='#bean.InsAloStlmCycle==\"5\"'>
						年结
						</s:elseif>	
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean."/>
						<s:if test='#bean.InsAloStlmMd==\"0\"'>
						T+0
						</s:if>
						<s:elseif test='#bean.InsAloStlmMd==\"1\"'>
						T+1
						</s:elseif>	
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmCNm"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmCAcct"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmCBkNo"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmCBkNm"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmDNm"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmDAcct"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmDBkNo"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.InsStlmDBkNm"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.RecUpdOpr"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.RecCrtTs"/>
						</td>
						<td class="tb-td" align="center">
						<s:property value="#bean.RecUpdTs"/>
						</td>
					<tr/>	
					</s:iterator>
				</tbody>
			</table>
			</div>
		</s:form>
</body>
</html>
